package com.fin.quant.instra.mysql.model;

import java.util.Date;

/**
 * AI消息记录表
 */
public class AiMessages {
    /**
    * 自增主键ID
    */
    private Long id;

    /**
    * 消息业务ID，用于业务逻辑关联
    */
    private String messageId;

    /**
    * 关联的会话ID，外键关联ai_conversations.conversation_id
    */
    private String conversationId;

    /**
    * 消息角色：user(用户), assistant(AI助手), system(系统)
    */
    private String role;

    /**
    * 消息内容，存储用户问题或AI回答的文本
    */
    private String content;

    /**
    * 消息上下文，存储页面数据、选中项目等JSON格式的上下文信息
    */
    private String context;

    /**
    * 消息创建时间
    */
    private Date createdAt;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getConversationId() {
        return conversationId;
    }

    public void setConversationId(String conversationId) {
        this.conversationId = conversationId;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
}